//
//  CalculateManager.m
//  blockTestOfBlog
//
//  Created by Song on 2018/5/9.
//  Copyright © 2018年 Song. All rights reserved.
//

#import "CalculateManager.h"

@implementation CalculateManager

-(CalculateManager *(^)(int))add {
    return ^(int value) {
        _result += value;
        return self;
    };
}


-(instancetype)calculate:(int (^)(int))calculateBlock {
    _result = calculateBlock(_result);
    return self;
}
-(instancetype)printResult:(void (^)(int))printBlock {
    printBlock(_result);
    return self;
}

@end
